package com.ruoyi.com.controller;


import com.ruoyi.com.domain.TUser;
import com.ruoyi.com.service.ITestService;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {


    @Autowired
    private ITestService testService;

    @RequiresPermissions("userMKname:userManage:list")
    @GetMapping("/userlist")
    public TableDataInfo testFeign(TUser tUser){
        TableDataInfo userlist = null;
        try {
            log.info("testFeign");
            log.debug("tUser={}", tUser);

            userlist = testService.userlist(tUser);

        } catch (Exception e) {
            e.printStackTrace();
        }
        return userlist;
    }
}
